import java.util.Random;
/**
 * A room that, on entry, teleports the player to another random room
 * 
 * @author Leander & Laurens
 * @version 6-1-2014
 */
public class TeleportRoom extends Room
{

    /**
     * Constructor for objects of class TeleportRoom
     * @param The description of this room
     */
    public TeleportRoom(String description)
    {
        super(description);
    }
    
    /**
     * Get a random room and teleport the player there.
     */
    public Room getRandomRoom()
    {
        Random randomGenerator = new Random();
        int amountOfRooms = roomList.size();
        int roomToReturn = randomGenerator.nextInt(amountOfRooms);
        
        return roomList.get(roomToReturn);
    }

}
